///*
// * Copyright The OpenTelemetry Authors
// * SPDX-License-Identifier: Apache-2.0
// */
//
//package com.xiashitech.agent.instrumentation.netty.netty_v4_1.client;
//
//import com.xiashitech.agent.instrumentation.netty.netty_v4_common.HttpRequestAndChannel;
//import com.xiashitech.agent.instrumentation.netty.netty_v4_common.client.NettyClientInstrumenterFactory;
//import com.xiashitech.agent.instrumentation.netty.netty_v4_common.client.NettyConnectionInstrumenter;
//import com.xiashitech.agent.instrumentation.netty.netty_v4_common.client.NettySslInstrumenter;
//import io.netty.handler.codec.http.HttpResponse;
//import io.netty.util.AttributeKey;
//import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;
//import io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.Instrumenter;
//
//public final class NettyClientSingletons {
//
//  public static final AttributeKey<HttpRequestAndChannel> HTTP_REQUEST =
//      AttributeKey.valueOf(NettyClientSingletons.class, "http-client-request");
//  public static final AttributeKey<HttpResponse> HTTP_RESPONSE =
//      AttributeKey.valueOf(NettyClientSingletons.class, "http-client-response");
//
//  private static final boolean connectionTelemetryEnabled;
//  private static final boolean sslTelemetryEnabled;
//
//  static {
//    InstrumentationConfig config = InstrumentationConfig.get();
//
//    // 升级到 1.29.0 后此类已经废弃移除 (DeprecatedConfigPropertyWarning)
//    // 此方法进是一个日志出入，理论上注释后不会有逻辑错误
////    DeprecatedConfigPropertyWarning.warnIfUsed(
////        config,
////        "otel.instrumentation.netty.always-create-connect-span",
////        "otel.instrumentation.netty.connection-telemetry.enabled");
//
//    boolean alwaysCreateConnectSpan =
//        config.getBoolean("otel.instrumentation.netty.always-create-connect-span", false);
//    connectionTelemetryEnabled =
//        config.getBoolean(
//            "otel.instrumentation.netty.connection-telemetry.enabled", alwaysCreateConnectSpan);
//    sslTelemetryEnabled =
//        config.getBoolean("otel.instrumentation.netty.ssl-telemetry.enabled", false);
//  }
//
//  private static final Instrumenter<HttpRequestAndChannel, HttpResponse> INSTRUMENTER;
//  private static final NettyConnectionInstrumenter CONNECTION_INSTRUMENTER;
//  private static final NettySslInstrumenter SSL_INSTRUMENTER;
//
//  static {
//    NettyClientInstrumenterFactory factory =
//        new NettyClientInstrumenterFactory(
//            "com.xiashitech.agent.instrumentation.netty.netty_v4_1", connectionTelemetryEnabled, sslTelemetryEnabled);
//    INSTRUMENTER = factory.createHttpInstrumenter();
//    CONNECTION_INSTRUMENTER = factory.createConnectionInstrumenter();
//    SSL_INSTRUMENTER = factory.createSslInstrumenter();
//  }
//
//  public static Instrumenter<HttpRequestAndChannel, HttpResponse> instrumenter() {
//    return INSTRUMENTER;
//  }
//
//  public static NettyConnectionInstrumenter connectionInstrumenter() {
//    return CONNECTION_INSTRUMENTER;
//  }
//
//  public static NettySslInstrumenter sslInstrumenter() {
//    return SSL_INSTRUMENTER;
//  }
//
//  private NettyClientSingletons() {}
//}
